package com.jintian.smart.kernel.security.controller;

import com.jintian.smart.base.api.security.form.DataTracerQueryForm;
import com.jintian.smart.base.api.security.view.DataTracerVO;
import com.jintian.smart.kernel.core.constant.SwaggerTagConst;
import com.jintian.smart.kernel.core.domain.ResponseDTO;
import com.jintian.smart.kernel.security.service.DataTracerService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import com.jintian.smart.kernel.common.controller.SupportBaseController;
import org.beetl.sql.core.page.PageResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 数据变动记录
 */

@RestController
@RequestMapping("/sec/dataTracer")
@Tag(name = SwaggerTagConst.Support.DATA_TRACER)
public class DataTracerController extends SupportBaseController {
    @Resource
    private DataTracerService dataTracerService;

    @Operation(summary = "分页查询业务操作日志")
    @PostMapping("/query")
    public ResponseDTO<PageResult<DataTracerVO>> query(@Valid @RequestBody DataTracerQueryForm queryForm) {
        return dataTracerService.query(queryForm);
    }
}
